package com.mark.mall.admin.platform.dto;

import com.mark.mall.admin.platform.entity.OrderDetail;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;

/**
 * @author Created on 2021/3/3 10:04
 */
@Data
@ApiModel("销售单详情")
public class ODetailDTO {
    @ApiModelProperty(value = "id")
    private String id;

    @ApiModelProperty(value = "物料名称")
    private String productName;

    @ApiModelProperty(value = "价格")
    private BigDecimal oprice;

    @ApiModelProperty(value = "物料价格")
    private BigDecimal price;

    @ApiModelProperty(value = "购买数量")
    private Integer num;

    public ODetailDTO(OrderDetail orderDetail) {
        this.id = orderDetail.getId();
        this.num = orderDetail.getNum();
        this.price = orderDetail.getPrice();
    }
}
